package com.sunnay.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sunnay.entity.AppUserOpinionEntity;
import com.sunnay.mapper.AppUserOpinionMapper;
import com.sunnay.service.AppUserOpinionService;
import com.sunnay.vo.auth.SystemUser;
import com.sunnay.vo.opinion.OpinionVo;
import org.springframework.stereotype.Service;


@Service
public class AppUserOpinionServiceImpl extends ServiceImpl<AppUserOpinionMapper, AppUserOpinionEntity> implements AppUserOpinionService  {
    @Override
    public void addOpinion(OpinionVo opinionVo, SystemUser systemUser) {
        AppUserOpinionEntity insert = new AppUserOpinionEntity();
        insert.setQuestionType(opinionVo.getQuestionType());
        insert.setSubStance(opinionVo.getSubStance());
        insert.setUserAccountId(Long.valueOf(systemUser.getId()));
        this.save(insert);
    }
}
